﻿using System;
using System.Text;
using System.Threading.Tasks;
using IceCS.Clicker.Core;

namespace IceCS.Clicker.Cmd
{
    class Program
    {
        static bool isExit = false;
        static void Main(string[] args)
        {
            while (!isExit)
            {
                ShowMenu();
                Console.WriteLine("输入菜单项编号");
                var key = Convert.ToInt32(Console.ReadLine());
                switch (key)
                {
                    case 1:
                        Console.WriteLine("想要点击的次数：");
                        var count = Convert.ToInt32(Console.ReadLine());
                        Task.Delay(3000).Wait();
                        Console.WriteLine("start!");
                        MouseCliker.LeftClick(count);
                        Console.WriteLine($"点击{count}完成");
                        break;
                    default:
                        break;
                }
            }

        }

        static void ShowMenu()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("----start -----");
            sb.Append("1. 左键点击");
            sb.Append("----end -----");
            Console.WriteLine(sb.ToString());
        }
    }
}
